﻿@model ScmCostplanViewModel
@{
    Layout = null;
    ViewBag.Title = "费用计划-添加";
}
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function dialogRefresh(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            $("#pagerForm", navTab.getCurrentPanel()).submit();
            $.pdialog.closeCurrent();
        }
    }
    </script>
@{Html.EnableClientValidation();}
@using (Html.BeginForm("CostPlanAddData", "ScmCostPlan", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogRefresh);", @class = "pageForm required-validate" }))
{
    <div class="pageContent">
        <div class="pageFormContent" layouth="60">
            <dl>
                <dt style="text-align:right">施工单位：</dt>
                <dd>
                    @Html.TextBoxFor(m => m.TheScmCostplanmainInfo.Cpm_ConstructionID, new { @type = "hidden" })
                    @Html.TextBoxFor(m => m.TheScmCostplanmainInfo.Cpm_ConstructionName, new Dictionary<string, object> { { "class", "data-val-required input02" }, { "readonly", "readonly" } })
                    @Html.ValidationMessageFor(m => m.TheScmCostplanmainInfo.Cpm_ConstructionName)

                    <a class="btnLook" href="@Url.Action("UnitList", "ProjectSegment", new { uId = "TheScmCostplanmainInfo_Cpm_ConstructionID", uName = "TheScmCostplanmainInfo_Cpm_ConstructionName", uSection = "TheScmCostplanmainInfo_Cpm_Section" })" lookupgroup="TheScmCostplanmainInfo" title="选择施工单位">查找带回</a>
                </dd>
            </dl>
            <dl>
                <dt style="text-align:right">标段：</dt>
                <dd>
                    @Html.TextBoxFor(model => model.TheScmCostplanmainInfo.Cpm_Section)
            </dl>
            <dl>
                <dt style="text-align:right">上报时间：</dt>
                <dd>
                    @Html.TextBoxFor(model => model.TheScmCostplanmainInfo.Cpm_ReportTime,
                    new { @class = "date", @readonly = "readonly", Value = DateTime.Now.ToString("yyyy-MM-dd") })
                </dd>
            </dl>
            <dl>
                <dt style="text-align:right">年份：</dt>
                <dd>
                    @*@Html.TextBoxFor(model => model.TheScmCostplanmainInfo.Cpm_YearMonth,
                             new { @class = "date", @readonly = "readonly", format = "yyyy年M月", Value = DateTime.Now.ToString("yyyy年M月") })*@
                    @Html.TextBoxFor(model => model.TheScmCostplanmainInfo.Cpm_YearMonth,
       new { @class = "date ", @readonly = "readonly", format = "yyyy-MM", Value = DateTime.Now.ToString("yyyy-MM") })
                    @Html.ValidationMessageFor(m => m.TheScmCostplanmainInfo.Cpm_YearMonth)
            </dl>
            <div class="divider"></div>
            <div class="panelBar">

                <ul class="toolBar">
                    <li class="nobg"><b>费用统计表</b></li>
                </ul>

            </div>
            <table class="tables tables-bordered tables-hover itemDetail" addbutton="新增" style="width: 100%">
                <thead>
                    <tr>
                        <th type="text" name="TheCostPlanList[#index#].itemInt" defaultval="#index#" size="6" fieldclass="digits">序号</th>
                        <th type="text" name="TheCostPlanList[#index#].Cp_Item" size="60" >凭证名目</th>
                        <th type="text" name="TheCostPlanList[#index#].Cp_Amount" defaultval="0.0" size="12" fieldclass="number">金额</th>
                        <th type="text" name="TheCostPlanList[#index#].Cp_Remark" size="50">备注</th>
                        <th type="del" width="60">删除</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            <input type="text" name="TheCostPlanList[0].itemInt" value="1" size="6" fieldclass="digits" style="width:90%;  margin:auto auto auto 2px;"></input>
                        </td>
                        <td>
                            <input type="text" name="TheCostPlanList[0].Cp_Item" value="" size="60" class=" textInput" style="width:90%;  margin:auto auto auto 2px;"></input>
                         
                        </td>
                        <td>
                            <input type="text" name="TheCostPlanList[0].Cp_Amount" value="0.0" size="12" fieldclass="number" style="width:90%;  margin:auto auto auto 2px;"></input>
                        </td>
                        <td>
                            <input type="text" name="TheCostPlanList[0].Cp_Remark" value="" size="50" style="width:90%;  margin:auto auto auto 2px;"></input>
                        </td>
                        <td><a href="javascript:void(0)" class="btnDel ">删除</a></td>

                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="tabsFooter">
        <div class="tabsFooterContent"></div>
    </div>

    <div class="formBar">
        <ul>
            <li>
                <button type="submit" class="btn btn-sm">保存</button>
            </li>
            <li>
                <button type="button" class="close btn btn-default btn-sm">取消</button>
            </li>

        </ul>
    </div>

}
    @*<form method="post" action="@Url.Action("CostPlanAddData", "ScmCostPlan")" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">*@



